package com.example.demo.entity;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

/**
 * @Author: WinstonDeng
 * @Description:
 * @Date: Created in 18:09 2020/4/7
 * @Modified by:
 */
public class QuestionnaireRecord {
    private long id;
    private long flowStepId;
    private String answer;
    private int score;
    private Timestamp createTime;
    private Timestamp updateTime;

    private Questionnaire questionnaire;

    public Questionnaire getQuestionnaire() {
        return questionnaire;
    }

    public void setQuestionnaire(Questionnaire questionnaire) {
        this.questionnaire = questionnaire;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getFlowStepId() {
        return flowStepId;
    }

    public void setFlowStepId(long flowStepId) {
        this.flowStepId = flowStepId;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    public String[] getAnswerList(){
        return answer.split(",");
    }
    @Override
    public String toString() {
        return "QuestionnaireRecord{" +
                "id=" + id +
                ", flowStepId=" + flowStepId +
                ", answer='" + answer + '\'' +
                ", score=" + score +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", questionnaire=" + questionnaire +
                '}';
    }
}
